<div id="allScoreList" style="width: 95%;height: 95vh;display: inline-block;margin-left: 2.5%;"></div>
<input type="hidden" value="<{$type1}>" id="allType1" />
<input type="hidden" value="<{$num2}>" id="num21" />
<input type="hidden" value="<{$yj1}>" id="yj11" />
<input type="hidden" value="<{$wj1}>" id="wj11" />
<script>
    var allType=$("#allType1").val(); //案件类型
    var allTypes=allType.split(",");
    var num2=$("#num21").val(); //案件类型占的比重
    var num2s=num2.split(",");
    var yj1=$("#yj11").val(); //所有案件已结比例
    var yj1s=yj1.split(",");
    var wj1=$("#wj11").val(); //所有案件未结比例
    var wj1s=wj1.split(",");
    
//          所有部门对比的饼状图
    var allScoreEvent = echarts.init(document.getElementById('allScoreList'));
    var data=[];
    for(var i=0;i<allTypes.length;i++){             
        data.push({
        name:allTypes[i],                       
        value:num2s[i]              
        });
    }
    var series=[];
    series.push({
        type: 'pie',
        radius : '50%',
        center: ['50%', '30%'],
        color: ['#39CBCA', '#C2D138', '#FFA809', '#E25C36'],
        data:data,
        label: {
            normal: {
                position: 'outside',
                formatter: ' {b}： {c}%',
                textStyle: {
                    color: '',
                    fontSize: 12
                }
            }
        },
        itemStyle: {
            emphasis: {
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
        }
    });
    series.push({
        name: '案件',
        type: 'pie',
        // roseType:'radius',
        radius : '50%',
        center: ['50%', '80%'],
        color: ['#EE8064','#3DB5F5','#EE8064','#3DB5F5'],
        data:[
        {value:yj1s, name:'已完结案件'},
        {value:wj1s, name:'未完结案件'},

        ],
        label: {
        normal: {
            position: 'inside',
            formatter: ' {b}： {c}%',
            textStyle: {
            color: '',
            fontSize: 12
            }
        }
        },
        itemStyle: {
        emphasis: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
        }
        }
    });
    var allScoreEventOption = {
        title :[{
            text: '各类案件数占总案件数比例',
            x: 'center',
        },{
            text: '所有案件完结情况分析',
            x:'center',
            y:'55%'
        }],
        tooltip:{
            trigger: 'item',
            formatter: "{a} {b} :{d}%",
            textStyle: {
                fontSize:14
            }
        },
        legend: {
            orient: 'vertical',
            left: 'left',
            // data: ['优秀','通过','建议修改']
        },
        grid: [
            {x: '7.5%',y: '65%', width: '88%', height: '30%'},
        ],
        series : series,
    };
    allScoreEvent.setOption(allScoreEventOption);
</script>